1. Field of the Invention
The invention relates to interpolation arithmetic operating apparatus and method which are suitable for use in enlargement and reduction of an image, conversion of a sampling frequency, or conversion of the number of lines.
2. Description of the Related Art
The NTSC (National Television System Committee) system and PAL (Phase Alternation by Line) system have been known as systems of a standard television broadcasting signal. According to the NTSC system, the number of scanning lines of one frame is equal to 525. According to the PAL system, the number of scanning lines of one frame is equal to 625. The numbers of scanning lines in the NTSC system and the PAL system are different.
Not only the standard system such as NTSC system or PAL system, the development of a television broadcasting of the HDTV (High Definition Television) system has been progressed in recent years. In the HDTV system, the number of scanning lines of one frame is set to 1125.
Further, in a computer image, a video signal of a format different from that of the television broadcasting is used, the number of pixels of VGA (Video Graphics Array) is equal to (640xc3x97480) dots, and the number of pixels of SVGA (Super VGA) is equal to (800xc3x97600) dots.
In case of performing the system conversion among the video signals of a plurality of systems in which the numbers of pixels in the horizontal direction are different and the numbers of scanning lines are different, an interpolation arithmetic operation is performed. In case of enlarging and reducing an image, the conversion of the numbers of pixels in the horizontal direction and the vertical direction is executed. An interpolation arithmetic operation is also performed in this instance.
The interpolation arithmetic operation intends to obtain a value of pixel data at a position where it does not exist in an original image by using peripheral pixel data.
For example, as shown in FIG. 1, it is now assumed that original pixels Ra, Rb, Rc, and Rd are arranged in the horizontal direction at a sampling interval S. It is assumed that pixel data at a position Q shown by an arrow is formed by an interpolation.
Since there is a correlation among the neighboring pixel data arranged in the horizontal direction, the pixel data at the position Q can be obtained from the pixel data of the pixels Ra, Rb, Rc, and Rd arranged at peripheral positions. That is, now assuming that filter coefficients are Ha, Hb, Hc, and Hd, the pixel data at the position Q can be obtained by the following convolution arithmetic operation.
Q=Haxc3x97Ra+Hbxc3x97Rb+Hcxc3x97Rc+Hdxc3x97Rd
Hitherto, a nearest neighborhood approximating method, a bilinear approximating method, or the like has been known as an approximating method of the interpolation arithmetic operation. According to the nearest neighborhood approximating method, the interpolation is performed by using the nearest neighboring pixel data. That is, in the nearest neighborhood approximating method, when (xe2x88x920.5 less than xxe2x89xa60.5),
f(x)=1
and when (xe2x88x920.5xe2x89xa7x, x greater than 0.5),
f(x)=0
According to the nearest neighborhood approximating method, since the interpolation is performed by replacing the nearest neighboring pixel data, its process is simple. However, precision of the interpolation is low.
According to the bilinear approximating method, the interpolation data is obtained by using the weighted mean of two neighboring pixels. That is, in the bilinear approximating method, when (|x|xe2x89xa61),
f(x)=1xe2x88x92|x|
When (|x| greater than 1),
f(x)=0
According to the bilinear approximating method, since an arithmetic operation of two taps is performed, a circuit scale is relatively small. As for a set of the filter coefficients, if two filter coefficients are added, an addition result is equal to xe2x80x9c1xe2x80x9d. Therefore, the coefficients can be relatively easily obtained.
That is, now assuming that a phase is labelled as p, the filter coefficients are obtained by xe2x80x9cx1=p, x2=1xe2x88x92p). When the phase p is equal to (p=0), the coefficient set is equal to (1, 0). When the phase p is equal to (p=0.5), the coefficient set is equal to (0.5, 0.5). When the phase p is equal to (p=0.3), the coefficient set is equal to (0.7, 0.3). Therefore, the filter coefficients can be obtained in a real-time manner.
However, according to the bilinear approximating method, although the interpolation precision is improved as compared with that by the nearest neighborhood approximating method, a picture plane is seen as if it blurred. It is difficult to obtain a high picture quality.
FIG. 2 shows a construction of a conventional interpolating circuit in case of performing the interpolation arithmetic operation by the bilinear approximating method.
In FIG. 2, reference numerals 102 and 103 denote delay circuits. The delay circuits 102 and 103 are cascade connected. Each of the delay circuits 102 and 103 has a delay amount of one sample. A shift register is constructed by the delay circuits 102 and 103.
Digital video data is supplied from an input terminal 101 to the cascade connection of the delay circuits 102 and 103. A clock is supplied from a clock input terminal 107 to the delay circuits 102 and 103. The digital video data from the input terminal 101 is transferred by the clock. Thus, pixel data of two continuous samples is obtained between the stages of the delay circuits 102 and 103. Outputs of the delay circuits 102 and 103 are supplied to multiplying circuits 104 and 105, respectively. Filter coefficients are supplied from a coefficient generating circuit 106 to the multiplying circuits 104 and 105.
Phase information is supplied from an input terminal 108 to the coefficient generating circuit 106.
The coefficient generating circuit 106 generates filter coefficients h1(p) and h2(p) according to the phase information. The filter coefficients h1(p) and h2(p) are used to generate the coefficients to perform the interpolation arithmetic operation by the bilinear approximating method. The filter coefficients h1(p) and h2(p) are supplied to the multiplying circuits 104 and 105.
In the multiplying circuits 104 and 105, each pixel data from the portion between the stages of the delay circuits 102 and 103 is multiplied by the filter coefficients h1(p) and h2(p) from the coefficient generating circuit 106, respectively. Outputs of the multiplying circuits 104 and 105 are supplied to an adding circuit 109. An output of the adding circuit 109 is taken out from an output terminal 110.
The above construction of an actual interpolation arithmetic operating circuit can be realized by hardware as it is or a procedure of such a circuit can be realized in a software manner by a software program installing a processor.
By performing the interpolation by the nearest neighborhood approximating method or bilinear approximating method as mentioned above, the interpolation arithmetic operation of an arbitrary ratio can be performed and, according to the interpolation by the nearest neighborhood approximating method, since the interpolation is performed by replacing the nearest neighboring pixel data, a sharp interpolation image is obtained. However, there are problems such that thicknesses of lines of characters are not uniform, an oblique line shaggy portion is conspicuous, and the like. On the other hand, according to the interpolation by the bilinear approximating method, a situation such that the thicknesses of lines of characters are not uniform or a shaggy portion is conspicuous or the like does not occur. However, if the interpolation is performed by the bilinear approximating method, a high band component of a picture plane is insufficient, the picture plane which is blurred as a whole is obtained, and it is difficult to obtain a high picture quality.
As mentioned above, each of the nearest neighborhood approximating method and bilinear approximating method has merits and demerits and which one of them is the optimum changes depending on characteristics of a picture plane to be displayed or a taste or a demand of the user. There is also a case where intermediate characteristics between the nearest neighborhood approximating method and the bilinear approximating method are required. For this purpose, an interpolation arithmetic operating method such as to have the intermediate characteristics between the nearest neighborhood approximating method and the bilinear approximating method is required.
Hitherto, the interpolating method has been fixed to either the nearest neighborhood approximating method or the bilinear approximating method. However, which one of them is the optimum changes depending on characteristics of a picture plane to be displayed or a taste or a demand of the user as mentioned above. Therefore, it is desired that the nearest neighborhood approximating method and the bilinear approximating method can be freely selected and it is possible to freely set any of the intermediate characteristics between the nearest neighborhood approximating method and the bilinear approximating method, characteristics which are closer to those of the nearest neighborhood approximating method between the nearest neighborhood approximating method and the bilinear approximating method, and characteristics which are closer to those of the bilinear approximating method.
It is an object of the invention to provide interpolation arithmetic operating apparatus and method which can fetch characteristics of the nearest neighborhood approximating method and characteristics of the bilinear approximating method at an arbitrary ratio and can perform an interpolation arithmetic operation.
According to the invention, there is provided an interpolation arithmetic operating apparatus for performing an interpolation by a convolution arithmetic operation by multiplying outputs of first and second taps by first and second filter coefficients, comprising:
cascade connected delay means for extracting the outputs of the first and second taps;
first and second multiplying means for multiplying the outputs of the first and second taps which are outputted from the delay means by the first and second filter coefficients, respectively;
adding means for adding outputs of the first and second multiplying means; and
coefficient generating means for generating the first and second filter coefficients in accordance with phase information and coefficient adjustment data,
wherein an interpolation arithmetic operation output is obtained from the adding means.
According to the invention, the first and second filter coefficient generating means can generate filter coefficients of characteristics of a nearest neighborhood approximating method to perform the interpolation by replacing nearest neighboring pixel data and filter coefficients of characteristics of a bilinear approximating method to obtain interpolation data by using a weighted mean of neighboring pixels and can generate filter coefficients of intermediate characteristics between the nearest neighborhood approximating method and the bilinear approximating method, and a ratio of the characteristics of the nearest neighborhood approximating method and a ratio of the characteristics of the bilinear approximating method can be set in accordance with the coefficient adjustment data.
According to the invention, when the coefficient generating means obtains the first filter coefficient h1(p), it subsequently obtains the second filter coefficient h2(p) by an arithmetic operation of
h2(p)=1xe2x88x92h1(p)
Coefficient adjustment data xcex1 is inputted to a coefficient generating circuit. By the coefficient adjustment data xcex1, either the nearest neighborhood approximating method or the bilinear approximating method can be selected and any of the intermediate characteristics between the nearest neighborhood approximating method and the bilinear approximating method, the characteristics which are closer to those of the nearest neighborhood approximating method between the nearest neighborhood approximating method and the bilinear approximating method, and the characteristics which are closer to those of the bilinear approximating method can be freely set.
The above and other objects and features of the present invention will become apparent from the following detailed description and the appended claims with reference to the accompanying drawings.